<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
 		<title></title>
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<jsp:include page="/page/front/include.jsp"></jsp:include>
		<link rel="stylesheet" type="text/css" href="css/front/book.css" />
		<link rel="stylesheet" type="text/css" href="css/front/book_list.css" />
	</head>
	<body class="bookList">
		<jsp:include page="/page/front/header.jsp"></jsp:include>
		<div class="body">
			<s:if test="category==0">
				<s:set name="cid" value="1"></s:set>
			</s:if><s:else>
				<s:set name="cid" value="category"></s:set>
			</s:else>
			<div class="bodyLeft">
				<s:action name="getCategoryMenu" executeResult="true" ignoreContextParams="true">
					<s:param name="id"><s:property value="#cid"/></s:param>
				</s:action>
			</div>
			<div class="bodyRight">
				<s:action name="getCategoryNav" executeResult="true" ignoreContextParams="true">
					<s:param name="id"><s:property value="#cid"/></s:param>
				</s:action>
				<form id="bookListForm" action="" method="get">
					<input name="id" value="" type="hidden">
					<input id="viewType" name="viewType" value="tableType" type="hidden">
					<input id="pageNumber" name="pager.pageNumber" value="1" type="hidden">
					<div class="blank"></div>
					<div class="operateBar">
						<div class="left"></div>
						<div class="middle">
							<span class="tableDisabledIcon">&nbsp;</span>列表
							<span class="pictureIcon">&nbsp;</span><a id="pictureType" class="pictureType" href="#">图片</a>
							<span class="separator">&nbsp;</span>
							<select id="orderType" name="orderType">
								<option value="default" selected="selected">默认排序</option>
								<option value="priceAsc">价格从低到高</option>
								<option value="priceDesc">价格从高到低</option>
								<option value="dateAsc">按上价时间排序</option>
							</select>
							<span class="separator">&nbsp;</span>显示数量:
							<select name="pager.pageSize" id="pageSize">
								<option value="12" selected="selected">12</option>
								<option value="24">24</option>
								<option value="60">60</option>
								<option value="120">120</option>
							</select>
						</div>
						<div class="right"></div>
					</div>
					<div class="blank"></div>
					<div class="bookTableList">
						<ul class="bookListDetail">
						<s:subset source="#session.books" count="20">
							<s:iterator>
							<li>
								<s:set name="id" value="value.bookID"></s:set>
								<s:set name="title" value="value.title"></s:set>
								<a href='viewBook.do?id=<s:property value="#id" />' class="bookImage" target="_blank">
									<img src='<s:property value="value.picPath" />' alt='<s:property value="#title"/>' title='<s:property value="#title"/>'>
								</a>
								<div class="bookTitle">
									<a href='viewBook.do?id=<s:property value="#id" />' target="_blank">
										<s:property value="#title" />
									</a>
								</div>
								<div class="bookRight">
									<div class="bookPrice">
										<span class="price"><s:property value="value.price" /></span>
										<span class="marketPrice">￥100.00</span>
									</div>
									<div class="bookButton">
										<input name="addCartItemButton" class="addCartItem" value="" hidefocus="true" type="button">
										<input name="addFavoriteButton" class="addFavorite" value="" hidefocus="true" type="button">
									</div>
								</div>
							</li>
							</s:iterator>
						</s:subset>
						</ul>
						<div class="blank"></div>
						<jsp:include page="/page/front/pager.jsp"></jsp:include>
					</div>
				</form>
			</div>
		</div>
		<jsp:include page="/page/front/footer.jsp"></jsp:include>
	</body>
</html>